<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2020/6/17
 * Time: 10:10
 */

namespace App\Services;


class ReponseCodeService
{
    const CODE_FAILE = 0;#失败
    #会员相关
    const CODE_ALREAD_EXISTS = 810;#用户已经存在
    const CODE_BLACK_LIST = 811;#已经被拉黑
    const CODE_NOT_FRIEND = 812;#不是好友
    const CODE_USER_NOT_FUND = 813;#用户不存在
    const CODE_USER_NOT_AUTH = 814;#用户没有权限
    const CODE_NOT_GROUP_MEMBER = 815;#非本群成员
    const CODE_NOT_SERVICE = 816;#非客服无法操作
    const CODE_NOT_BLACK_LIST  = 817;#不是黑名单
    const CODE_GROUP_MEMBER  = 818;#已经是群成员
    const CODE_GROUP_NOT_FUND = 819;#群不存在

    #系统相关
    const CODE_OK =200;#请求成功
    const CODE_EMPTY =820;#没有内容更新
    const CODE_DB_ERROR =821;#数据库错误
    const CODE_SERVICE_UNAVAILABLE = 503;#服务不可用

    #消息相关
    const CODE_DUPLICATE =831;#重复消息
    #请求错误
    const  CODE_BAD_REQUEST = 400;#参数错误
    const  CODE_UNAUTHORIZED =401;#未授权，需要重新登录
    const  CODE_LOGIN_INFO_NO_FUND =402;#异常登录

    #后台相关
    const CODE_SUPPORT_PERSON_MOBILE_EXIST = '900001';#用户已经存在
    const CODE_SUPPORT_PERSON_MOBILE_NOT_EXIST = '900002';#用户不存在

  public static $phrases = [
         0=>'Faile',
        200 => 'OK',
        201 => 'Created',
        202 => 'Accepted',
        203 => 'Non-Authoritative Information',
        204 => 'No Content',
        205 => 'Reset Content',
        206 => 'Partial Content',
        207 => 'Multi-status',
        208 => 'Already Reported',
        300 => 'Multiple Choices',
        301 => 'Moved Permanently',
        302 => 'Found',
        303 => 'See Other',
        304 => 'Not Modified',
        305 => 'Use Proxy',
        306 => 'Switch Proxy',
        307 => 'Temporary Redirect',
        400 => 'Bad Request',
        401 => 'Unauthorized',
        402 => 'Payment Required',
        403 => 'Forbidden',
        404 => 'Not Found',
        405 => 'Method Not Allowed',
        406 => 'Not Acceptable',
        407 => 'Proxy Authentication Required',
        408 => 'Request Time-out',
        409 => 'Conflict',
        410 => 'Gone',
        411 => 'Length Required',
        412 => 'Precondition Failed',
        413 => 'Request Entity Too Large',
        414 => 'Request-URI Too Large',
        415 => 'Unsupported Media Type',
        416 => 'Requested range not satisfiable',
        417 => 'Expectation Failed',
        418 => 'I\'m a teapot',
        422 => 'Unprocessable Entity',
        423 => 'Locked',
        424 => 'Failed Dependency',
        425 => 'Unordered Collection',
        426 => 'Upgrade Required',
        428 => 'Precondition Required',
        429 => 'Too Many Requests',
        431 => 'Request Header Fields Too Large',
        451 => 'Unavailable For Legal Reasons',
        500 => 'Internal Server Error',
        501 => 'Not Implemented',
        502 => 'Bad Gateway',
        503 => 'Service Unavailable',
        504 => 'Gateway Time-out',
        505 => 'HTTP Version not supported',
        506 => 'Variant Also Negotiates',
        507 => 'Insufficient Storage',
        508 => 'Loop Detected',
        511 => 'Network Authentication Required',
        810=> '用户已经存在',
        811=> '用户已经是黑名单',
        814=> '用户未被授权',
        813=> '用户不存在',
        815=>'非本群成员',
        816=>'只有客服被授权',
        817=>'不在黑名单',
        818=>'已经是群成员',
        819=>'群成员不存在',
        900001=>'用户已经存在',
        900002=>'用户不存在'
    ];

}